/*
 * @Descripttion: 
 * @Author: yuxi
 * @Date: 2022-10-02 21:26:33
 * @LastEditors: yuxi
 * @LastEditTime: 2022-10-25 15:15:08
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import { componentRouters } from '../examples/index'
let redirect = '/'
if(componentRouters.length > 0) {
  redirect = componentRouters[0].path
}
const routes = [
  { path: '/', 
  component:  resolve => require(['../examples/index.vue'], resolve), 
  children: componentRouters, redirect 
},
]

const router = new VueRouter({
  routes 
})
export default router